﻿using UnityEngine;
using System.Collections;
using FrameWork;
using UnityEngine.UI;

public class TestTwo : BaseUI {

    public override EnumUIType GetUIType()
    {
        return EnumUIType.TestTwo;
    }

    private Button btn;
    // Use this for initialization
    void Start()
    {
        btn = transform.Find("Panel/Button").GetComponent<Button>();
        btn.onClick.AddListener(OnClickedBtn);
    }
	
	// Update is called once per frame
	void Update () {
	
	}

    private void OnClickedBtn()
    {
          UIManager.Intance.OpenUI(EnumUIType.TestOne);
          UIManager.Intance.CloseUI(EnumUIType.TestTwo);
 //       UIManager.Intance.OpenUICloseOthers(EnumUIType.TestOne);
//         GameObject go = Instantiate(Resources.Load("Prefabs/TestOne")) as GameObject;
//         TestOne tt = go.GetComponent<TestOne>();
//         if (null == tt)
//         {
//            /* tt =*/ go.AddComponent<TestOne>();
//         }
   
    }

}
